import { format } from "path"

/*
 *    Copyright (c) 2018-2025, lengleng All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 * Redistributions of source code must retain the above copyright notice,
 * this list of conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright
 * notice, this list of conditions and the following disclaimer in the
 * documentation and/or other materials provided with the distribution.
 * Neither the name of the pig4cloud.com developer nor the names of its
 * contributors may be used to endorse or promote products derived from
 * this software without specific prior written permission.
 * Author: lengleng (wangiegie@gmail.com)
 */

export const tableOption = {
  border: true,
  index: true,
  indexLabel: '序号',
  stripe: true,
  menuAlign: 'center',
  align: 'center',
  column: [
	  {
      label: '编号',
      prop: 'id'
    },
	  {
      label: '设备号',
      prop: 'pdid'
    },
	  {
      label: '激活时间',
      prop: 'activeTime',
      addDisplay: false,
      editDisplay: false,
    },
	  {
      label: '上次更新时间',
      prop: 'lastGenTime',
      addDisplay: false,
      editDisplay: false,
    },
	  {
      label: '状态',
      prop: 'status'
    },
	  {
      label: '经度',
      prop: 'lon'
    },
	  {
      label: '纬度',
      prop: 'lat'
    },
	  {
      label: '设备信息',
      prop: 'info'
    },
	  {
      label: 'oem',
      prop: 'oem'
    },
	  {
      label: '类型',
      prop: 'type'
    },
	  {
      label: '是否在线',
      prop: 'online',
      type: 'select',
      dicUrl: '/admin/dict/type/online_status'
    },
	  {
      label: '接触点',
      prop: 'contactPoint'
    },
	  {
      width: 150,
      label: '创建时间',
      prop: 'createTime',
      type: 'datetime',
      addDisplay: false,
      editDisabled: true,
      format: 'yyyy-MM-dd HH:mm',
      valueFormat: 'yyyy-MM-dd HH:mm:ss'
    },
	  {
      label: '更新时间',
      prop: 'updateTime',
      hide: true,
      addDisplay: false,
      editDisplay: false,
    },
	  {
      label: '删除标记',
      prop: 'delFlag',
      hide: true,
      addDisplay: false,
      editDisplay: false,
    },
  ]
}
